/*
 * bw_TsMux.h
 *
 *  Created on: 2018年11月9日
 *      Author: linsainan
 */

#ifndef BW_TSMUX_H_
#define BW_TSMUX_H_

typedef enum{
	BWENC_TXMUX_PCRCRC_DIRECT = 1, // 直通
	BWENC_TXMUX_PCRCRC_CORRECTION,
	BWENC_TXMUX_PCRCRC_REGEN

}eTSMUX_PCRCRC_t;

typedef struct ch_prg_
{
	unsigned int index;
	char service_name[50];
	char provider_name[50];
	
	unsigned short service_id;
	unsigned short pmt_pid;
	unsigned short pmt_pid_map;
	
	unsigned short pcr_pid;
	unsigned short pcr_pid_map;

	unsigned short v_pid;
	unsigned short v_pid_map;

	unsigned short a_pid;
	unsigned short a_pid_map;

	unsigned int pcr_interval;
	unsigned int mux_bitrate;
}MUX_PRG_INFO;

typedef struct _input_prg
{
	char prg_name[50];
	char prg_index;
	char is_mux;//0,没被复用，1：被复用
}InputPrgInfo;

typedef struct _input_info
{
	unsigned int chl_index;
	char chl_name[50];
	unsigned int prg_total;
	InputPrgInfo inputprg[32];
}InputChInfo;

typedef struct _mux_add
{
	unsigned int input_ch;
	unsigned int input_prg_ch;//1,开始
	unsigned int output_ch;
}MuxAdd;

#ifdef __cplusplus
	extern "C" {
#endif
	const char* general_set(const char* json);
	const char* general_get();
	const char* pgm_list(const char *json);
	const char* pgm_sel_list(const char* json);
	const char* pgm_parse_prg(const char* json);
	const char* pgm_muxselect(const char* json);
#ifdef __cplusplus
	}
#endif
#endif /* BW_TSMUX_H_ */
